<template>
  <div
    class="all"
    :style="{ height: screenHeight + 'px', width: screenWidth + 'px' }"
  >
    <div class="top">
      <van-icon name="arrow-left" @click="returnTap" />
      <span>资料详情</span>
      <span style="font-weight: bold">完成</span>
    </div>
    <div class="message">
      <img
        @click="show = true"
        class="return_icon"
        src="../../../../static/images/me/headimg.png"
        alt=""
      />
      <span @click="show1=true">{{text}}</span>
    </div>
    <div class="coll">
      <div class="coll1">姓名</div>
      <input type="text" class="coll2" placeholder="崔总" />
    </div>
    <div class="coll">
      <div class="coll1">电话</div>
      <input type="text" class="coll2" placeholder="12334567891011" />
    </div>
    <div class="title">添加备注</div>
    <div class="coll" style="border-top: 5px solid #eee">
      <div class="coll1" style="width: 30%">创建时间：</div>
      <input type="text" class="coll3" placeholder="2020年8月20日 " />
    </div>
    <van-overlay
      :show="show"
      @click="show = false"
      style="background: rgba(30, 30, 30, 0.5)"
    >
      <div class="wrapper" @click.stop>
        <div class="block">
          <div class="blockOne">拍摄</div>
          <div class="blockOne block1">从手机相册选择</div>
          <div class="blockOne" @click="show = false">取消</div>
        </div>
      </div>
    </van-overlay>
    <van-popup v-model="show1" position="bottom">
      <van-picker
        title="标题"
        show-toolbar
        :columns="columns"
        @confirm="onConfirm"
        @cancel="show1 =false"
        @change="onChange"
      />
    </van-popup>
  </div>
</template>
<script>
export default {
  data() {
    return {
      screenWidth:
        window.innerWidth ||
        document.documentElement.clientWidth ||
        document.body.clientWidth,
      screenHeight:
        window.innerHeight ||
        document.documentElement.clientHeight ||
        document.body.clientHeight,
      show: false,
      show1:false,
      columns: ["客户", "战败", "保有"],
      text:"客户"
    };
  },
  methods: {
    returnTap() {
      this.$router.go(-1);
    },
    onConfirm(value, index) {
      console.log(value,index)
      this.text=value
      this.show1 = false
    },
    onChange(picker, value, index) {
     console.log(picker,value,index)
    },

  },
};
</script>
<style scoped>
.top {
  height: 60px;
  width: 90%;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 60px;
  position: relative;
  background: #eeeeee;
}
.all {
  background: #eeeeee;
}
.message {
  height: 180px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: #fff;
}
.message img {
  width: 100px;
  height: 100px;
}
.message span {
  font-size: 18px;
  margin-top: 10px;
}
.coll {
  width: 96%;
  padding-left: 4%;
  height: 60px;
  display: flex;
  align-items: center;
  background: #fff;
}
.coll1 {
  width: 15%;
  text-align: center;
  font-size: 20px;
  color: #b8b8b8;
}
.coll2 {
  width: 85%;
  height: 40px;
  border: none;
  text-align: center;
  /* border-bottom: 0.5px solid #d7d7d7; */
}
.title {
  height: 50px;
  text-align: center;
  line-height: 50px;
  border-top: 50px solid #eee;
  color: #b8b8b8;
  background: #fff;
}
.coll3 {
  width: 60%;
  height: 40px;
  border: none;
}
.block {
  height: 215px;
  width: 100%;
  position: fixed;
  right: 0px;
  bottom: 0px;
  z-index: 100;
  background: rgba(255, 255, 255, 1);
  border-radius: 5px;
  z-index: 999;
}
.blockOne {
  height: 68px;
  width: 100%;
  text-align: center;
  line-height: 68px;
}
.block1 {
  border-bottom: 5px solid #bebebe;
}
</style>